Skip to content

[Workflow] Update workflow.rst #18058

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 17, 2023
Merged

[Workflow] Update workflow.rst #18058

merged 1 commit into from
Mar 17, 2023

Conversation

Mick3DIY
Copy link
Contributor

Add Tip for using constants in YAML files to define a large workflow and use these constants everywhere ! :) Cheers to the team <3

workflow.rst Outdated
@@ -160,6 +160,10 @@ follows:
If you are creating your first workflows, consider using the ``workflow:dump``
command to :doc:`debug the workflow contents </workflow/dumping-workflows>`.

.. tip::

Since Symfony 3.2, you can use constants in YAML files and add some in the BlogPost entity for places ``draft`` by ``!php/const App\Entity\BlogPost::STATE_DRAFT`` or for transitions ``to_review`` by ``!php/const App\Entity\BlogPost::TRANSITION_TO_REVIEW``.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know if it's relevant to indicate that it's since Symfony 3.2, are we used to refer to old versions?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure too... I start my update with this article : https://symfony.com/blog/new-in-symfony-3-2-php-constants-in-yaml-files
I just discover than we can add constant in YAML, since 2016 :(

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes there's no ned to add the reference to Symfony 3.2. So, let's remove "Since Symfony 3.2, " and keep the rest. Thanks.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done, thank you !

@MrYamous
Copy link
Contributor

I like this use case, maybe this is also an opportunity to add it on this page which is about yaml format https://symfony.com/doc/current/reference/formats/yaml.html ?

@carsonbot carsonbot changed the title Update workflow.rst [Workflow] Update workflow.rst Mar 17, 2023
@javiereguiluz javiereguiluz added this to the 5.4 milestone Mar 17, 2023
@javiereguiluz
Copy link
Member

Michaël, thanks a lot for improving docs ... and congrats on your first Symfony Docs contribution 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants